﻿using Newtonsoft.Json;
using PlaceOrder_Shared.Models.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
namespace PlaceOrder_Shared.ModelsToLily
{
    /// <summary>
    /// 异常单
    /// </summary>
    public class ChatWorkOrder
    {
        public int Status { get; set; }
        public string? MessageId { get; set; }
        public string? Remarks { get; set; }
        public int Type { get; set; }
        public int? ReviewBy { get; set; }

        public List<string> TradeIds { get; set; } = new List<string>();

        // 为 DataGrid 显示提供逗号分隔的字符串
        public string TradeIdsString => string.Join(", ", TradeIds);
        public int? Weight { get; set; } = 100;

        public string? ChatMessageInfo {  get; set; }

        public List<UserTrade> XunJiaDanDetails { get; set; }
        public DateTime UpdateTime { get; set; }
        public DateTime CreateTime { get; set; }


    }


    /// <summary>
    /// 原生Lily数据
    /// </summary>
    public class LilyChatWorkOrder
    {
        [JsonProperty("id")]
        public string Id { get; set; }

        [JsonProperty("createTime")]
        public DateTime CreateTime { get; set; }

        [JsonProperty("updateTime")]
        public DateTime UpdateTime { get; set; }

        [JsonProperty("status")]
        public int Status { get; set; }

        [JsonProperty("messageId")]
        public string MessageId { get; set; }

        [JsonProperty("remarks")]
        public string Remarks { get; set; }

        [JsonProperty("createBy")]
        public int? CreateBy { get; set; }

        [JsonProperty("reviewedBy")]
        public int? ReviewedBy { get; set; }

        [JsonProperty("type")]
        public int? Type { get; set; }

        [JsonProperty("tradeIds")]
        public string TradeIds { get; set; }

        [JsonProperty("weight")]
        public int? Weight { get; set; }

    }

}
